﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Licensed MIT: http://www.opensource.org/licenses/mit-license.php


namespace DNA.Mvc.Data.Entity
{
    public class EntityRepository<T> : EntityRepositoryBase<DB, T>
        where T:class
    {
        public EntityRepository()
        {
            context = new DB();
            dbSet = this.Context.Set<T>();
            IsOwnContext = true;
        }

        public EntityRepository(DB dbContext)
        {
            context = dbContext; 
            dbSet = this.Context.Set<T>();
            IsOwnContext = false;
        }
    }
}
